<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">  
    <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="{% url 'dashboard' %}">  
        <i class="fas fa-wallet me-2"></i> SaveStar  
    </a>  
    <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">  
        <span class="navbar-toggler-icon"></span>  
    </button>  
    <div class="w-100"></div>  
    <div class="navbar-nav">  
        <div class="nav-item text-nowrap">  
            {% if user.is_authenticated %}  
                <a class="nav-link px-3" href="{% url 'logout' %}">退出登录</a>  
            {% else %}  
                <a class="nav-link px-3" href="{% url 'login' %}">登录</a>  
            {% endif %}  
        </div>  
    </div>  
</header>  